package com.thti.mecool.client.base;

import java.util.HashMap;

import com.thti.mecool.client.protocol.user.User;

import android.app.Application;
import android.content.SharedPreferences;
import android.content.res.Configuration;

public class BaseApplication extends Application{

	private User user;
	private boolean autoLoad;
	private HashMap<String,String> dataStat;
	public HashMap<String, String> getDataStat() {
		return dataStat;
	}

	public void setDataStat(HashMap<String, String> dataStat) {
		this.dataStat = dataStat;
	}

	public boolean isAutoLoad() {
		return autoLoad;
	}

	public void setAutoLoad(boolean autoLoad) {
		this.autoLoad = autoLoad;
	}
	
	public User getUser() {
		return user;
	}
	
	public void setUser(User user) {
		this.user = user;
	}
	@Override
	public void onConfigurationChanged(Configuration newConfig) {
		super.onConfigurationChanged(newConfig);
	}
	@Override
	public void onCreate() {
		super.onCreate();
		SharedPreferences sharedPreferences=getSharedPreferences("Setting", 0);
		setAutoLoad(sharedPreferences.getBoolean("BootLoad", false));
	}

	@Override
	public void onLowMemory() {
		// TODO Auto-generated method stub
		super.onLowMemory();
	}

	@Override
	public void onTerminate() {
		// TODO Auto-generated method stub
		super.onTerminate();
	}

}
